Baseball, by the Rules

Pitcher Logan Webb of the San Francisco Giants waits for the return throw from his catcher, after pitching to Elias Díaz of the San Diego Padres.
The Plate Appearance Continues
When no runners are on base, the pitch timer generally restarts when the ball is thrown back to the pitcher, though the umpire might not restart the timer right away on certain foul balls1. With no one on base, the timer counts down from 15 seconds. The batter must be back in the box and ready to swing by the 8 second mark, and the pitcher must go back into motion before time runs out.